export const purchaseColumns = [
    {
        label: '物料类型',
        prop: 'materialFlagType',
        type: 'cascader',
        cascaderItem: ['materialGroupNo'],
        dicUrl: '/api/hg-public/materialinfo/getTree?code=materials&dictKey=M,E',
        props: {
            label: 'dictValue',
            value: 'dictKey',
        },
        rules: [
            {
                required: true,
                message: '请选择物料类型',
                trigger: 'blur',
            },
        ],
        defaultChecked: true,
        hide: true,
        display: false,
    },
    {
        label: '物料组',
        prop: 'materialGroupNo',
        slot: true,
        type: 'select',
        filterable: true,
        props: {
            label: 'materialGroupName',
            value: 'materialGroupNo',
        },
        cascaderIndex: 0,
        dicUrl: `/api/hg-public/materialgroup/list?materialType={{key}}`,
        rules: [
            {
                required: true,
                message: '请选择物料组',
                trigger: 'blur',
            },
        ],
        defaultChecked: true,
        hide: true,
        display: false,
    },
    {
        label: '物料',
        prop: 'addMaterialNo',
        type: "select",
        filterable: true,
        dicData: [],
        hide: true,
        display: true,
        addFlag: true,
        rules: [
            {
                required: true,
                message: '请选择物料',
                trigger: 'blur',
            },
        ],
    },
    {
        label: '物料编码',
        prop: 'materialNo',
        defaultChecked: true,
        disabled: true,
        hide: true,
        display: false,
    },
    {
        label: '物料名称',
        prop: 'materialName',
        defaultChecked: true,
        disabled: true,
        hide: true,
        display: false,
    },
    {
        label: '规格',
        prop: 'specifications',
        defaultChecked: true,
        maxlength: 30,
        hide: true,
        display: false,
        disabled: true,
    },
    {
        label: '型号',
        prop: 'model',
        defaultChecked: true,
        maxlength: 30,
        hide: true,
        display: false,
        disabled: true,
    },
    {
        label: '采购数量',
        prop: 'purchaseNum',
        type: "number",
        minRows: 0,
        maxRows: 999999,
        defaultChecked: true,
        hide: true,
        display: false,
        rules: [
            {
                required: true,
                message: '请输入采购数量',
                trigger: 'blur',
            },
        ],
    },
    {
        label: '计划到货日期',
        prop: 'planArrivalDate',
        type: 'date',
        valueFormat: 'yyyy-MM-dd',
        hide: true,
        display: false,
    },
    {
        label: '实际到货日期',
        prop: 'actualArrivalDate',
        type: 'date',
        valueFormat: 'yyyy-MM-dd',
        hide: true,
        display: false,
    },
    {
        label: '实际数量',
        prop: 'actualNum',
        hide: true,
        display: false,
    },
]